
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <blockquote> 
 <p><strong>高级的题库更新之后，专业性更强了，不是真正从事这一行的，很难做出来。本人就是个小菜鸡，有一些题，我也不想不明白。题目的答案我尽可能的找到出处，如果读者发现错误或有补充建议，欢迎评论或私信笔者。笔者这篇就当抛砖引玉，各位读者可以当作考试的一个参考</strong></p> 
</blockquote> 
<h4><a name="t0"></a><a id="HarmonyOShttpsblogcsdnnetGusha_articledetails140072321spm1001201430015502_5"></a>基础认证题库请移步：<a href="https://blog.csdn.net/Gusha_/article/details/140072321?spm=1001.2014.3001.5502">HarmonyOS应用开发者基础认证题库</a></h4> 
<hr> 
<h3><a name="t1"></a><a id="20_8"></a><code>注：有读者反馈，题库的代码块比较多，打开文章时会卡死。所以笔者将题库拆分，以20道题为一组，题库目录如下，读者可以按需跳转。如果对您的阅读产生不便，笔者在这里向大家说声抱歉，请各位读者原谅。该题库已整理完毕，笔者不再更新。笔者连续考了三次，都过了，所以答案应该没什么太大问题。有需要题库文档的可以自取。祝各位读者好运(๑¯ω¯๑)。</code></h3> 
<h2><a name="t2"></a><a id="_10"></a>序号目录：</h2> 
<ul><li>单选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140295266?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580616?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580633?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号3</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140617294">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号4</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140749409?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号5</a></li><li>多选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140580653?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580668?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140613052?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号3</a></li><li>答案纯享版<br> <a href="https://blog.csdn.net/Gusha_/article/details/140676104?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 答案纯享版</a></li></ul> 
<hr> 
<h4><a name="t3"></a><a id="httpspanbaiducoms153tDk4dVv_MmLEyzOqW9hQpwdxkgr_24"></a>题库文档链接（自取）：https://pan.baidu.com/s/153tDk4dVv_MmLEyzOqW9hQ?pwd=xkgr</h4> 
<hr> 
<h2><a name="t4"></a><a id="_29"></a>注：题目是乱序，每次考试，选项的顺序都不同</h2> 
<h3><a name="t5"></a><a id="_09_092_31"></a>单选题题库 - 序号2</h3> 
<hr> 
<p>21、在一个包含多个模块（如entry、feature、har、hsp等）的大型<a href="https://so.csdn.net/so/search?q=HarmonyOS&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=HarmonyOS&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;HarmonyOS\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=HarmonyOS&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;HarmonyOS\&quot;}&quot;}" data-tit="HarmonyOS" data-pretit="harmonyos">HarmonyOS</a>应用项目中，如果要对某个静态共享模块构建出静态构建包产物，如何通过DevEco Studio进行构建</p> 
<p>​ A、选中har模块，点击build<a href="https://so.csdn.net/so/search?q=%E8%8F%9C%E5%8D%95%E6%A0%8F&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E8%8F%9C%E5%8D%95%E6%A0%8F&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;菜单栏\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E8%8F%9C%E5%8D%95%E6%A0%8F&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;菜单栏\&quot;}&quot;}" data-tit="菜单栏" data-pretit="菜单栏">菜单栏</a>build hap（s）</p> 
<p>​ B、选中hap模块，点击通过菜单栏make module ‘hap’</p> 
<p>​ <code>C、选中har模块，点击build菜单栏make module 'har'</code></p> 
<p>​ D、选中hsp模块，点击通过菜单栏make module ‘hsp’.</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hvigor-build-har-0000001772704332-V5#section197792874110" rel="nofollow">构建HAR-配置构建-编译构建-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>22、want参数的entities匹配规则错误的是</p> 
<p>​ A、调用方传入的want参数的entities不为空，待匹配应用组件的skills配置中的entities不为空且包含调用方传入的want参数的entities，则entities匹配成功。</p> 
<p>​ B、调用方传入的want参数的entities不为空，待匹配应用组件的skills配置中的entities为空，则entities匹配失败。</p> 
<p>​ C、调用方传入的want参数的entities为空，待匹配应用组件的skills配置中的entities为空，则entities匹配成功。</p> 
<p>​ <code>D、调用方传入的want参数的entities为空，待匹配应用组件的skills配置中的entities不为空，则entities匹配失败。</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/explicit-implicit-want-mappings-V5#want%E5%8F%82%E6%95%B0%E7%9A%84entities%E5%8C%B9%E9%85%8D%E8%A7%84%E5%88%99" rel="nofollow">显式Want与隐式Want匹配规则-信息传递载体Want-Stage模型应用组件-Stage模型开发指导-Ability Kit（程序框架服务）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>23、HAR（Harmony Archive）是HarmonyOS提供的共享包，以下关于HAR的描述错误的是</p> 
<p>​ A、HAR可以作为二方库和三方库提供给其他应用使用，如果需要对代码资产进行保护时，建议开启混淆能力。</p> 
<p>​ B、HAR不支持在设备上单独安装/运行，只能作为应用模块的依赖项被引用。</p> 
<p>​ <code>C、HAR不支持使用page页面。</code></p> 
<p>​ D、HAR不支持引用AppScope目录中的资源。在编译构建时，AppScope中的内容不会打包到HAR中，因此会导致HAR资源引用失败。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/har-package-V5" rel="nofollow">HAR-应用程序包开发与使用-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>24、应用开发中使用的各类资源文件，需要放入特定子目录中存储管理，以下关于资源说法错误的是</p> 
<p>​ A、base目录是默认存在的目录，二级子目录<span class="words-blog hl-git-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.10283&quot;,&quot;extra&quot;:&quot;{\&quot;words\&quot;:\&quot;element\&quot;}&quot;}" data-tit="element" data-pretit="element">element</span>用于存放字符串、颜色、布尔值等基础元素，media、profile存放媒体、动画、布局等资源文件。</p> 
<p>​ <code>B、rawfile目录，支持创建多层子目录，子目录名称可以自定义，文件夹内可以自由放置各类资源文件。目录中的资源文件会被编译成二进制文件，并赋予资源文件ID。</code></p> 
<p>​ C、resfile目录，应用安装后，resfile资源会被解压到应用沙箱路径，通过Context属性resourceDir获取到resfile资源目录后，可通过文件路径访问。</p> 
<p>​ D、stage模型多工程情况下，共有的资源文件放到AppScope下的resources目录。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/resource-categories-and-access-V5" rel="nofollow">资源分类与访问-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>25、应用程序开发调试过程中，经常需要安装新应用进行调测，下面安装应用操作错误的是</p> 
<p>​ A、bm install -p ohosapp.hap -r</p> 
<p>​ B、bm install -p /data/app/</p> 
<p>​ C、bm install -p ohosapp.hap</p> 
<p>​ <code>D、hdc install -p ohosapp.hap</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/hdc-V5#%E5%BA%94%E7%94%A8%E7%9B%B8%E5%85%B3%E5%91%BD%E4%BB%A4" rel="nofollow">hdc-调试命令-调测调优-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>26、一个应用的一个UIAblity，其exported字段配置为false，以下哪个场景可以拉起这个UIAbility。（不确定，把所有选项列出）</strong></p> 
<p>​ <strong>A、caller应用在后台，有START_INVISIBLE_ABILITY权限；</strong></p> 
<p>​ B、caller应用在后台，有START_ABILITY_FROM_BACKGROUND权限；</p> 
<p>​ <code>C、caller应用在后台，申请了长时任务，有START_INVISIBLE_ABILITY权限；</code></p> 
<p>​ D、caller应用在后台，申请了长时任务，有START_ABILITY_FROM_BACKGROUND权限；</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/scenario-fusion-error-code-V5#section1649161475615" rel="nofollow">ArkTS组件错误码-ArkTS组件-Scenario Fusion Kit（融合场景服务）-应用服务 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>27、一个应用有2个UIAbility组件，其module.json中abilities标签的配置如下方代码。（不确定，把所有选项列出）</strong></p> 
<p><strong>在手机设备上，执行如下操作后：</strong></p> 
<p><strong>1.启动UIAbility1，然后back键返回销毁UIAbility1；</strong></p> 
<p><strong>2.启动UIAbility2，然后back键返回销毁UIAbility2；</strong></p> 
<p><strong>3.启动UIAbility2，然后back键返回销毁UIAbility2；</strong></p> 
<p><strong>进入多任务列表，能看看到该应用的几个任务视图：</strong></p> 
<pre data-index="0" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token string-property property">"abilities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
      <span class="token punctuation">{<!-- --></span>
        <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"UIAbility1"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/entryability/Ability1.ets"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"description"</span><span class="token operator">:</span> <span class="token string">"$string:EntryAbility_desc"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"icon"</span><span class="token operator">:</span> <span class="token string">"$media:icon"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"label"</span><span class="token operator">:</span> <span class="token string">"$string:Ability1_label"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"startWindowIcon"</span><span class="token operator">:</span> <span class="token string">"$media:icon"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"startWindowBackground"</span><span class="token operator">:</span> <span class="token string">"$color:start_window_background"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"exported"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token string-property property">"launchType"</span><span class="token operator">:</span> <span class="token string">"multiton"</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token punctuation">{<!-- --></span>
        <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"UIAbility2"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/entryability/Ability2.ets"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"description"</span><span class="token operator">:</span> <span class="token string">"$string:Ability2_desc"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"icon"</span><span class="token operator">:</span> <span class="token string">"$media:icon"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"label"</span><span class="token operator">:</span> <span class="token string">"$string:Ability2_label"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"startWindowIcon"</span><span class="token operator">:</span> <span class="token string">"$media:icon"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"startWindowBackground"</span><span class="token operator">:</span> <span class="token string">"$color:start_window_background"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"exported"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token string-property property">"launchType"</span><span class="token operator">:</span> <span class="token string">"singleton"</span><span class="token punctuation">,</span>
        <span class="token string-property property">"removeMissionAfterTerminate"</span><span class="token operator">:</span> <span class="token boolean">true</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.365837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:0,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、0个</strong></p> 
<p>​ <strong>B、1个</strong></p> 
<p>​ <strong>C、2个</strong></p> 
<p>​ <code>D、3个</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/module-configuration-file-V5#abilities%E6%A0%87%E7%AD%BE" rel="nofollow">module.json5配置文件-应用配置文件（Stage模型）-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>28、某个应用开发了一个UIAbilityA，其启动模式是specified，并且对应的AbilityStage的实现如下：（不确定，把所有选项列出）</strong></p> 
<pre data-index="1" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">import</span> AbilityStage <span class="token keyword">from</span> <span class="token string">'@ohos.app.ability.AbilityStage'</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token keyword">type</span> <span class="token class-name">Want</span> <span class="token keyword">from</span> <span class="token string">'@ohos.app.ability.Want'</span>

<span class="token keyword">export</span>  <span class="token keyword">default</span> <span class="token keyword">class</span> <span class="token class-name">MyAbilityStage</span> <span class="token keyword">extends</span> <span class="token class-name">AbilityStage</span> <span class="token punctuation">{<!-- --></span>

  <span class="token keyword">this</span><span class="token punctuation">.</span>instanceIndex <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>

  <span class="token function">onAcceptWant</span><span class="token punctuation">(</span>want<span class="token operator">:</span> Want<span class="token punctuation">)</span><span class="token operator">:</span> <span class="token builtin">string</span> <span class="token punctuation">{<!-- --></span>

    <span class="token keyword">if</span> <span class="token punctuation">(</span>want<span class="token punctuation">.</span>abilityName <span class="token operator">===</span> <span class="token string">'UIAbilityA'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

      <span class="token keyword">if</span> <span class="token punctuation">(</span>want<span class="token punctuation">.</span>parameters <span class="token operator">&amp;&amp;</span> want<span class="token punctuation">.</span>parameters<span class="token punctuation">.</span>instanceKey <span class="token operator">===</span> <span class="token string">'test'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

        <span class="token keyword">return</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">test_instance_</span><span class="token template-punctuation string">`</span></span> <span class="token operator">+</span> <span class="token keyword">this</span><span class="token punctuation">.</span>instanceIndex<span class="token operator">++</span><span class="token punctuation">;</span>

      <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>

        <span class="token keyword">return</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">test_instance</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>

      <span class="token punctuation">}</span>

    <span class="token punctuation">}</span>

    <span class="token keyword">return</span> <span class="token string">'MyAbilityStage'</span><span class="token punctuation">;</span>

  <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.365837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:1,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="2" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	依次调用如下方法4次启动UIAbilityA，value分别是"test" "test" "testA" "testA"，则当前运行期UIAbility实例有几个</span>

<span class="token keyword">function</span> <span class="token function">testSpecified</span><span class="token punctuation">(</span>context<span class="token punctuation">,</span> value<span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>

  <span class="token keyword">let</span> want<span class="token operator">:</span> Want <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span>

    deviceId<span class="token operator">:</span> <span class="token string">''</span><span class="token punctuation">,</span>

    bundleName<span class="token operator">:</span> <span class="token string">'com.samples.stagemodelabilitydevelop'</span><span class="token punctuation">,</span>

    abilityName<span class="token operator">:</span> <span class="token string">'UIAbilityA'</span><span class="token punctuation">,</span>

    moduleName<span class="token operator">:</span> <span class="token string">'entry'</span><span class="token punctuation">,</span>

    parameters <span class="token operator">:</span><span class="token punctuation">{<!-- --></span>

      instanceKey<span class="token operator">:</span> value

    <span class="token punctuation">}</span>

  <span class="token punctuation">}</span><span class="token punctuation">;</span>

  context<span class="token punctuation">.</span><span class="token function">startAbility</span><span class="token punctuation">(</span>want<span class="token punctuation">)</span><span class="token punctuation">.</span> <span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>

    hilog<span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span><span class="token constant">DOMAIN_</span> <span class="token constant">NUMBER</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'Succeeded in starting UIAbilityA.'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token punctuation">(</span>err<span class="token operator">:</span> BusinessError<span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>

    hilog<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span><span class="token constant">DOMAIN_</span> <span class="token constant">NUMBER</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">Failed to start UIAbilityA. Code is </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${<!-- --></span>err<span class="token punctuation">.</span>code<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">, message is </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${<!-- --></span>err<span class="token punctuation">.</span>message<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span>

  <span class="token punctuation">}</span><span class="token punctuation">)</span>

<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.365837;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:2,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、1个</strong></p> 
<p>​ <strong>B、2个</strong></p> 
<p>​ <code>C、3个</code></p> 
<p>​ <strong>D、4个</strong></p> 
<hr> 
<p>29、通过aa工具拉起com.example.test的EntryAbility，并传参给EntryAbility，具体参数是number类型的[key1, 1] [key2, 2] 和string类型的[key3, testString] [key4, ’ ']，那边下面那个aa命令是正确的：</p> 
<p>​ A、aa start -b com.example.test -a EntryAbility --pi key1 1 --pi key2 2 --ps key3 testString --ps key4</p> 
<p>​ B、aa start -b com.example.test -a EntryAbility --pi key1 1 key2 2 --ps key3 testString --psn key4</p> 
<p>​ C、aa start -b com.example.test -a EntryAbility --pi key1 1 --pi key2 2 --ps key3 testString --psn key4 ‘’</p> 
<p>​ <code>D、aa start -b com.example.test -a EntryAbility --pi key1 1 --pi key2 2 --ps key3 testString --psn key4</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/aa-tool-V5#start" rel="nofollow">aa工具-调试命令-调测调优-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>30、应用发生崩溃，（）接口可以获取到崩溃时调用栈</p> 
<p>​ <code>A、hiAppEvent</code></p> 
<p>​ B、hiLog</p> 
<p>​ C、hiTraceMeter</p> 
<p>​ D、hiDebug</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/hiappevent-watcher-crash-events-V5" rel="nofollow">崩溃事件介绍-崩溃事件-系统事件-事件订阅-HiAppEvent使用指导-Performance Analysis Kit（性能分析服务）-调测调优-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>31、hiAppEvent提供的Watcher接口，（）属性不配置，会导致编译报错，产生"ArkTS Compiler Error".</p> 
<p>​ A、triggerCondition</p> 
<p>​ <code>B、name</code></p> 
<p>​ C、onReceive</p> 
<p>​ D、onTrigger</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-hiviewdfx-hiappevent-V5#watcher" rel="nofollow">@ohos.hiviewdfx.hiAppEvent (应用事件打点)-ArkTS API-Performance Analysis Kit（性能分析服务）-调测调优-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>32、为了提高性能，所以List组件支持懒加载，可以通过配置cachedCount属性设置缓存列表项的数量。当我们不设置List的属性cachedcount时，该属性的默认值是？</p> 
<p>​ A、0</p> 
<p>​ <code>B、1</code></p> 
<p>​ C、2</p> 
<p>​ D、3</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-container-list-V5#cachedcount" rel="nofollow">List-容器组件-基于ArkTS的声明式开发范式-ArkTS组件-ArkUI（方舟UI框架）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>33、我们需要避免在逐帧调用的接口中执行耗时操作，下面哪个选项不属于上述的接口？</p> 
<p>​ A、onAreaChange</p> 
<p>​ B、onScroll</p> 
<p>​ C、onTouch</p> 
<p>​ <code>D、aboutToReuse</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-custom-component-lifecycle-V5#abouttoreuse10" rel="nofollow">自定义组件的生命周期-自定义组件-基于ArkTS的声明式开发范式-ArkTS组件-ArkUI（方舟UI框架）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>34、关于ArkUI的ForEach和LazyForEach，下列说法错误的是?</p> 
<p>​ A、LazyForEach需要配合cachedCount和组件复用一起使用，以达到性能的最优表现。</p> 
<p>​ B、当在滚动容器中使用了LazyForEach，框架会根据滚动容器可视区域按需创建组件，当组件滑出可视区域外时，框架会进行组件销毁回收以降低内存占用。</p> 
<p>​ <code>C、长列表滚动场景，优先使用ForEach。</code></p> 
<p>​ D、ForEach和LazyForEach会根据定义的键值生成规则为数据源的每个数组项生成唯一键值，并创建相应的组件。</p> 
<hr> 
<p>35、关于<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;自动化测试\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;自动化测试\&quot;}&quot;}" data-tit="自动化测试" data-pretit="自动化测试">自动化测试</span>描述正确的是：</p> 
<p>​ <code>A、XTS子系统是认证测试套件的集合，当前包括acts（application compatibility test suite）应用兼容性测试套件，后续会拓展dcts(device compatibility test suite）设备兼容性测试套件等。</code></p> 
<p>​ B、Fuzz测试就是通过构造不规则的输入，从而触发程序的某种bug；Fuzz测试属于白盒测试。Fuzz测试也叫做模糊测试，通过输入非法字段，并观察<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;软件\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;软件\&quot;}&quot;}" data-tit="软件" data-pretit="软件">软件</span>是否异常来实现。一方面可以通过向软件输入非法字段，另一方面也可以通过向网络服务发送异常报文。</p> 
<p>​ C、DT(开发者测试)就是UT，可看护的范围包括边界值问题、空指针或赋值错误，内部业务逻辑问题等等。</p> 
<p>​ D、自动化测试因提高效率，减少重复工作的特性而被广泛采用；自动化测试可以替代手动测试在处理复杂、难以预测的用户交互或特殊边界条件。</p> 
<p><a href="https://www.bookstack.cn/read/openharmony-1.0-zh-cn/readme-XTS%E8%AE%A4%E8%AF%81%E5%AD%90%E7%B3%BB%E7%BB%9FREADME.md#5g87ce" rel="nofollow">OpenHarmony开发者文档 - XTS认证子系统 - 《华为鸿蒙操作系统(OpenHarmony) v1.0 开发者文档》 - 书栈网 · BookStack</a></p> 
<hr> 
<p>36、以下关于HAP（Harmony Ability Package）说法正确的是（）</p> 
<p>​ A、DevEco Studio会在编译构建时，不需要对HAP进行一致性校验。</p> 
<p>​ B、HAP是应用安装和运行的基本单位，在DevEco Studio工程目录中，一个HAP对应一个Module。应用打包时，所有的Module都只能生成.hap文件。</p> 
<p>​ <code>C、应用工程如果包含多个Module，在应用市场上架时，会将多个.hap文件打包成一个.app文件。</code></p> 
<p>​ D、应用工程编出的app文件中，只能包含一个hap文件。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hvigor-verification-rule-0000001772544660-V5" rel="nofollow">HAP唯一性校验逻辑-配置构建-编译构建-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>37、某App有A、B、C、D四个团队分别负责ModuleA、ModuleB、ModuleC和ModuleD四个业务模块，随着业务的发展，ModuleA需要跳转到ModuleB、ModuleC的页面，ModuleB需要跳转到ModuleC、ModuleD的界面，ModuleC需要跳转到ModuleA的界面，ModuleD需要跳转到ModuleB和ModuleC的界面。由于复杂的依赖关系，导致一旦有变化就需要知会各个团队，所以该团队的架构师想要解耦各个业务模块，以下哪些做法是不推荐的（）</p> 
<pre data-index="3" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// 图片略</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.365837;"><li style="color: rgb(153, 153, 153);">1</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:3,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、在RouterModule中采用路由表方式解耦各个业务模块。</p> 
<p>​ B、采用RouterModule作为中介者并用动态import解耦各个业务模块。</p> 
<p>​ C、可以采用Navigation作为页面导航根容器，将其放在entry中，其他Module的页面作为Navigation的子页面。</p> 
<p>​ <code>D、采用静态import方式引入对应跳转的页面。</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-dynamic-import-V5" rel="nofollow">动态import-应用程序包开发与使用-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>38、以下对系统兼容性的理解正确的是</p> 
<p>​ A、 应用不需要关注系统的兼容性变化，那都是系统开发人员需要关注的事情</p> 
<p>​ B、安全法律法规等不可控因素会导致系统非兼容性变更，开发者需要积极适配</p> 
<p>​ C、系统能力都会保持绝对的兼容性，不能因为任何非兼容性的修改而导致开发者成本上升</p> 
<p>​ <code>D、已发布的系统能力有可能会发生非兼容性变更，比如新增特性或修改问题导致的行为不兼容，这种情况下应用需要关注changelog并进行适配。</code></p> 
<hr> 
<p>39、在moduleA（HAP）类型中有一个图片名为<span class="words-blog hl-git-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.10283&quot;,&quot;extra&quot;:&quot;{\&quot;words\&quot;:\&quot;image\&quot;}&quot;}" data-tit="image" data-pretit="image">image</span>.png，在moduleB（HAR类型）也存在一个图片名为image.png，而moduleA依赖于moduleB，那么在moduleA的编译产物hap包中，image.png存在情况是：</p> 
<p>​ <code>A、仅存在moduleA的image.png</code></p> 
<p>​ B、两者都存在</p> 
<p>​ C、仅存在moduleB的mage.png</p> 
<p>​ D、两者都不存在</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/har-package-V5#%E7%BA%A6%E6%9D%9F%E9%99%90%E5%88%B6" rel="nofollow">HAR-应用程序包开发与使用-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>40、关于代理提醒开发使用的接口是</p> 
<p>​ <code>A、使用publishReminder发布一个提醒类通知，使用cancelReminder取消一个指定的提醒类通知</code></p> 
<p>​ B、使用startBackgroundRunning申请任务，使用stopBackgroundRunning取消任务</p> 
<p>​ C、使用requestSuspendDelay申请任务，使用getRemainingDelayTime获取任务剩余时间</p> 
<p>​ D、使用startWork申请任务，使用stopWork取消任务，使用getWorkStatus获取任务状态</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/agent-powered-reminder-V5#%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E" rel="nofollow">代理提醒-Background Tasks Kit（后台任务开发服务）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr>
                